#include <QtCore>
#include <QtGui>
#include <assert.h>
#include <string>
using namespace std;
#include "main.h"
template <typename Array, size_t Size> inline size_t dimof(const Array ( & )[Size])
{
	return Size;
}
MyWidget::MyWidget(QWidget *parent)
		: QWidget(parent)
{
}
void MyWidget::paintEvent(QPaintEvent *)
{
	QImage image("./elvis.png");
	QRectF target(10.0, 10.0, image.width(), image.height());
	QRectF source(0.0, 0.0, image.width(), image.height());
	QPainter painter(this);
	painter.drawImage(target, image, source);
}
int main(int argc, char *argv[])
{
	MyApp app(argc, argv);
	MyWidget widget;
	
	widget.resize(600, 800);
	widget.show();
	return app.exec();
}

